clearset mem 500mcd "/Users/michelemargolis/Desktop/april 23/"use "dataFD_1.dta"set more offset seed 12345estsimp logit restrict art8 leftrule interact5 flexible gnpcap regnorm gdpgrow resgdp bopgdp /// useimfcr surveil univers resvol totvol tradedep military termlim parli year lastrest lastrest2 /// lastrest3, cluster(imf_ccode) mi(dataFD_)setx meansetx flexible mediansetx useimfcr median setx surveil median setx military mediansetx termlim mediansetx art8 0 leftrule 0 interact5 0setx lastrest 1setx lastrest2 1setx lastrest3 1simqi, prval(1) genpr(nonsig_noleft)setx meansetx flexible mediansetx useimfcr median setx surveil median setx military mediansetx termlim mediansetx art8 0 leftrule 1 interact5 0 setx lastrest 1setx lastrest2 1setx lastrest3 1simqi, prval(1) genpr(nonsig_left)setx meansetx flexible mediansetx useimfcr median setx surveil median setx military mediansetx termlim mediansetx art8 1 leftrule 0 interact5 0setx lastrest 1setx lastrest2 1setx lastrest3 1simqi, prval(1) genpr(sig_noleft)setx meansetx flexible mediansetx useimfcr median setx surveil median setx military mediansetx termlim mediansetx art8 1 leftrule 1 interact5 1setx lastrest 1setx lastrest2 1setx lastrest3 1simqi, prval(1) genpr(sig_left)g diff1 =  (nonsig_left - nonsig_noleft)g diff2 =  (sig_left - sig_noleft)g did = diff1-diff2clearset mem 500mcd "/Users/michelemargolis/Desktop/april22/"use "treaty_1.dta"set more offestsimp logit restrict art8 leftrule_exc interact7 flexible gnpcap regnorm gdpgrow resgdp bopgdp /// useimfcr surveil univers resvol totvol tradedep military termlim parli year lastrest lastrest2 /// lastrest3, cluster(imf_ccode) mi(treaty_) setx meansetx flexible mediansetx useimfcr median setx surveil median setx military mediansetx termlim mediansetx art8 0 leftrule_exc 1 interact7 0simqi, prval(1) genpr(nonsig_right)setx meansetx flexible mediansetx useimfcr median setx surveil median setx military mediansetx termlim mediansetx art8 0 leftrule_exc 3 interact7 0 simqi, prval(1) genpr(nonsig_left)setx meansetx flexible mediansetx useimfcr median setx surveil median setx military mediansetx termlim mediansetx art8 1 leftrule_exc 1 interact7 1 simqi, prval(1) genpr(sig_right)setx meansetx flexible mediansetx useimfcr median setx surveil median setx military mediansetx termlim mediansetx art8 1 leftrule_exc 3 interact7 3simqi, prval(1) genpr(sig_left)g diff1 = nonsig_left - nonsig_rightg diff2 = sig_left - sig_rightg did_exc = diff1 - diff2clearset mem 500mcd "/Users/michelemargolis/Desktop/april22/"use "treaty_1.dta"set more offestsimp logit restrict art8 leftrule_inc interact6 flexible gnpcap regnorm gdpgrow resgdp bopgdp /// useimfcr surveil univers resvol totvol tradedep military termlim parli year lastrest lastrest2 /// lastrest3, cluster(imf_ccode) mi(treaty_)  setx meansetx flexible mediansetx useimfcr median setx surveil median setx military mediansetx termlim mediansetx art8 0 leftrule_inc 1 interact6 0simqi, prval(1) genpr(nonsig_right)setx meansetx flexible mediansetx useimfcr median setx surveil median setx military mediansetx termlim mediansetx art8 0 leftrule_inc 3 interact6 0 simqi, prval(1) genpr(nonsig_left)setx meansetx flexible mediansetx useimfcr median setx surveil median setx military mediansetx termlim mediansetx art8 1 leftrule_inc 1 interact6 1 simqi, prval(1) genpr(sig_right)setx meansetx flexible mediansetx useimfcr median setx surveil median setx military mediansetx termlim mediansetx art8 1 leftrule_inc 3 interact6 3simqi, prval(1) genpr(sig_left) g diff1 = nonsig_left - nonsig_rightg diff2 = sig_left - sig_rightg did_inc = diff1 - diff2sum didg test = did / diff1mean(test)  **FIRST DIFFERENCES FOR NON-SIGNATORIES - GENERATE THE VARIABLES setx meansetx useimfcr mediansetx surveil mediansetx art8 0simqi, fd(prval(1)) changex(leftrule 0 1) setx leftrule 0simqi, prval(1) genpr(test)setx meansetx useimfcr mediansetx surveil mediansetx art8 1simqi, fd(prval(1)) changex(leftrule 0 1) genpr(sig)